#!/usr/bin/perl

$svn = "/usr/local/bin/svn";

# get version number
$ver = `cat build/AcrCalibrator.jsx | grep 'var scriptVersion'`;
$ver =~ s/[\r\n]//g;
$ver =~ s/.*?\(x//;
$ver =~ s/\).*//;

exec "cd tags; $svn update; mkdir -p $ver; cp -f ../build/AcrCalibrator.jsx $ver/AcrCalibrator.jsx; cd $ver; zip AcrCalibrator.zip AcrCalibrator.jsx; rm -f AcrCalibrator.jsx; cd ..";

exec "$svn update";
